﻿@using QuocHoi_TV_Frontend.Models;
@{List<News> lstCountestnews = DataModels.GetCountestNews(12);}
<div id="viewsmost">
    <div class="tile_viewsmost">Đọc nhiều nhất</div>
    <div class="box_vm">
        <ul>
            @foreach (News item in lstCountestnews)
            {
                string strlinkNewsest = Url.RouteUrl("NewsDetail",
                   new
                   {
                       controller = "News",
                       action = "NewsDetailHome",
                       cate_name = Util.RemoveSign4VietnameseString(item.Category.CateName),
                       year = DateTime.Parse(item.CreateDate.ToString()).Year,
                       month = DateTime.Parse(item.CreateDate.ToString()).Month,
                       news_title = Util.RemoveSign4VietnameseString(item.NewsTitle),
                       newsID = item.NewsID
                   }
                    );
                <li>
                    <div class="img_box_vm">
                        <a href="@Html.Raw(strlinkNewsest)">
                            <img width="100" height="57" src="@item.PathImgSmall">
                        </a>
                        <p>@Html.Raw(NewsHelper.Sliptsubject(item.NewsTitle, 30))</p>
                    </div>
                </li>
            }
        </ul>
    </div>
</div>
